package com.application.model.utils;

import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ManagerFile {

	public static String getContenido(String path) throws FileNotFoundException, IOException {
		StringBuffer contenido = new StringBuffer();
		File file = new File(path);
		if (file.exists()) {
			FileInputStream fileInputStream = new FileInputStream(path);
			DataInputStream input = new DataInputStream(fileInputStream);
			while (input.available() != 0) {
				contenido.append(input.readLine());
			}
			input.close();
		}
		return contenido.toString();
	}
}
